package com.sunrate.investingquote.dao.router;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sunrate.investingquote.bean.router.ChannelInfo;
import com.sunrate.investingquote.mapper.router.ChannelInfoMapper;
import org.springframework.stereotype.Service;

/**
 * @author yyh
 * @description:
 * @date 2023/06/29/ 16:31
 */
@Service
public class ChannelInfoDao extends ServiceImpl<ChannelInfoMapper, ChannelInfo> {

    public ChannelInfo getByChannelCode(String channelCode) {
        LambdaQueryWrapper<ChannelInfo> wrapper = Wrappers.lambdaQuery(ChannelInfo.class)
                .eq(ChannelInfo::getChannelCode, channelCode);
        return baseMapper.selectOne(wrapper);
    }
}
